{% extends 'base_home.htm' %}

{% block middle %}
<div id="m1">
<div class="title1">搜索事件：{{search_value}}
</div>
<div class="tip">共有{{ ret|length }}个结果。</div>
{% if ret %}
{% for event in ret %}
<div class="each_friend2">
  <div><b><a href="../event/?event={{event.key}}">{{event.title}}</a></b></div>
  <div>{{event.description}}</div>
  <div style="color:#666;">
  	<span>By：<a href="../home/?user={{event.user.user_id}}">{{event.user.nickname}}</a></span>
	<span>Progress:{{event.progress}}</span>
	<span>Start:{{event.start_date}}</span>
	<span>End:{{event.end_date}}</span>
	{%ifnotequal event.user.nickname username%}
	<span id="span_{{event.key}}">[<a href="javascript:add_to_concern('{{event.key}}')">加为关注</a>]</span>
	{% endifnotequal %}
  </div> 
</div>
{% endfor %}
{% else %}
<p>没有和"{{search_value}}"相关的事件!</p>
{% endif %}     
<div id="mes_box" style="display:none;">
  <script type="text/javascript">
	new Draggable('mes_box');
  </script>
  <div>请选择您的相关事件：</div>
  <div>
	  {%if myevents%}
	<select id="eid"><!--eid为要添加到的属于自己的事件-->
	  {%for event in myevents %}
	  <option value="{{event.key}}">{{event.title}}</option>
	  {% endfor %}
	</select>
	<input	type="hidden" id="recorder"/><!--记录被关注事件-->
	<input type="button" value="确认" onclick="send_concern()"/>
	{%else%}您没有任何事件!{%endif%}
    <input type="button" value="取消" onclick="$('mes_box').hide();"/>
  </div>	
</div>
{% endblock %} 
